package com.peas.platform.module.icims.contract.initial.adapter.repository.po;

import java.math.*;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;
import javax.validation.constraints.*;

// 初始合同执行-请款
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_contract_initial_cash`")
public class ContractInitialCashPo extends BasePo {

    // 合同ID
    // 【初始合同表】
    @Comment(value = "合同ID")
    @NotNull(message = "合同ID不能为空")
    @TableField(value = "`contract_initial_id`", jdbcType = JdbcType.BIGINT)
    private Long contractInitialId;

    // 批次号
    @Comment(value = "批次号")
    @Size(max = 20, message = "批次号不能超过20个字符")
    @TableField(value = "`batch`", jdbcType = JdbcType.VARCHAR)
    private String batch;

    // 请款类型
    // 收款、付款
    // 字典取值:ContractInitialCashType
    @Comment(value = "请款类型", dictType = "ContractInitialCashType")
    @Size(max = 20, message = "请款类型不能超过20个字符")
    @TableField(value = "`cash_type`", jdbcType = JdbcType.VARCHAR)
    private String cashType;

    // 请款经办人
    // 【用户表】
    @Comment(value = "请款经办人")
    @TableField(value = "`cash_user_id`", jdbcType = JdbcType.BIGINT)
    private Long cashUserId;

    // 请款经办人部门
    // 【组织架构表】
    @Comment(value = "请款经办人部门")
    @TableField(value = "`cash_department_id`", jdbcType = JdbcType.BIGINT)
    private Long cashDepartmentId;

    // 请款金额
    @Comment(value = "请款金额")
    @TableField(value = "`cash_amount`", jdbcType = JdbcType.DECIMAL)
    private BigDecimal cashAmount;

    // 请款状态
    // 枚举取值:ContractInitialCashState
    @Comment(value = "请款状态", enumType = "ContractInitialCashState")
    @Size(max = 20, message = "请款状态不能超过20个字符")
    @TableField(value = "`state`", jdbcType = JdbcType.VARCHAR)
    private String state;

}
